import { createApp } from 'vue'
import App from './App.vue'
import setupPlugins from '@/plugins'
import Schema from 'async-validator'


// 本地SVG图标
import 'virtual:svg-icons-register'

// 样式
// import '@/styles/element/index.scss'
import '@/styles/index.scss'
import 'animate.css'
import 'uno.css'
import ElementPlus,{ElDialog, ElLink} from 'element-plus'
// 设置报错提示信息
Schema.messages.required = fieldName => {
  return '该项为必填项'
}
/*
* 单独导出一下组件，可以看到组件的各个属性，修改就可以了
* 但是 dialog的属性设置会导致 elDrawer 的也生效，。没找到什么问题
*/

ElDialog.props.closeOnClickModal.default = false;
ElLink.props.underline.default = false
// 修改全局 draggable
ElDialog.props.draggable = {
  default: true,
  type: ElDialog.props.draggable
}


const app = createApp(App)
app.use(ElementPlus)
app.use(setupPlugins)
app.mount('#app')
